package com.project.srtp.secure.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

import static com.baomidou.mybatisplus.annotation.FieldFill.INSERT;

/**
 * @author 曹行阳
 * @version 0.1
 * @date 2025/6/16 13:21
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_encryption_sender_key")
public class EncryptionSenderKeyDO {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Integer keyId;
    private Long preKeyId;
    private Long identityKeyId;
    private String partyId;
    private Integer chainId;
    private Integer step;
    private String userId;
    private String senderKey;
    @TableField(fill = INSERT)
    private LocalDateTime dtTimestamp;

    @Override
    public String toString() {
        return userId + ":" + partyId + ":" + chainId;
    }
}
